/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ejercicios;
/**
 *
 * @author Kelly Ruiz
 */

public class Circulo extends Geometria {
    static int numCir = 0;
    public static final double PI=3.141592653587;
    public double x, y, r;
    
    public Circulo(double x, double y, double r){
        this.x=x;
        this.y=y;
        this.r=r;
        numCir++;
    }
    
    public Circulo(double r){ 
        this(0.0, 0.0, r);
    }
    
    public Circulo(Circulo c){
        this(c.x, c.y, c.r); 
    }
    public Circulo() { this(0.0, 0.0, 1.0); }
    
    public double perimetro() {
        
        return 2.0 * PI * r; }
    
    public double area(){
        return PI * r * r;
    }
    
    public Circulo Mayor(Circulo c){
        if (this.r>= c.r)
            return this;
        else
            return c;
    }
    
}
    
